export const getBanner = ()=>fetch("http://106.12.79.128:666/banner?type=2")

export const getGedan = () => fetch("http://106.12.79.128:666/personalized?limit=6")

export const login = () => fetch("http://106.12.79.128:666/login/cellphone?phone=15556353801&password=wangyigdk951",{credentials: 'include'})

export const getNewCD = () => fetch("http://106.12.79.128:666/top/album")

export const getTopList = () => fetch("http://106.12.79.128:666/toplist/detail")

export const getGdDetail = (id) => fetch(`http://106.12.79.128:666/playlist/detail?id=${id}`)

export const tuijian = () => fetch("http://106.12.79.128:666/recommend/resource")

export const searchHot = () => fetch("http://106.12.79.128:666/search/hot")

export const searchSong = (keywords) => fetch(`http://106.12.79.128:666/search?keywords=${keywords}`)



//高高高
export const getMemory = (id) => fetch(`http://106.12.79.128:666/user/record?uid=${id}&type=0`)

export const getDj = () => fetch("http://106.12.79.128:666/dj/sublist",{
  credentials: 'include'
})

export const get_songList = (id) => fetch(`http://106.12.79.128:666/user/playlist?uid=${id}`)

//获取收藏专辑
export const get_shoucang_zhuanji = () => fetch("http://106.12.79.128:666/album/sublist",{
  credentials: 'include'
})

//获取收藏歌手
export const get_shoucang_geshou = () => fetch("http://106.12.79.128:666/artist/sublist",{
  credentials: 'include'
})
//获取订阅的电台
export const get_shoucang_diantai = () => fetch("http://106.12.79.128:666/dj/sublist")
//获取私人fm
export const get_sirenfm = () => fetch("http://106.12.79.128:666/personal_fm")

//获取音乐url
export const get_music_url = (url) => fetch(`http://106.12.79.128:666/song/url?id=${url}`)

//获取我喜欢的音乐的歌曲列表及歌曲id
export const get_like_music_id = (id) => fetch(`http://106.12.79.128:666/likelist?uid=${id}`)

//根据歌单id获取歌单详情
export const get_gedan_details = (id) => fetch(`http://106.12.79.128:666/playlist/detail?id=${id}`)

//根据歌单id获取歌曲详情
export const get_song_details = (id) => fetch(`http://106.12.79.128:666/song/detail?ids=${id}`)

//根据歌手id获取其热门50单曲
export const get_geshou_50songs = (id) => fetch(`http://106.12.79.128:666/artist/top/song?id=${id}`)

//登录
// export const login1 = () => fetch(`http://106.12.79.128:666/login/cellphone?phone=15556353801&password=wangyigdk951`,{
//   credentials:'include'
// })

//获取歌手专辑（有图片）
export const get_geshou_zhuanji = (id) => fetch(`http://106.12.79.128:666/artist/album?id=${id}`)

//获取歌手描述
export const get_geshou_info = (id) => fetch(`http://106.12.79.128:666/artist/desc?id=${id}`)

//通过音乐id和like参数选择是否喜欢歌曲
export const to_like_song = (id,like) => fetch(`http://106.12.79.128:666/like?id=${id}&like=${like}`,{
  credentials: 'include'
})

// 获取歌曲评论
export const get_song_pinglun = (id,limit) => fetch(`http://106.12.79.128:666/comment/music?id=${id}&limit=${limit}`)







